package com.bdqn.service;

import com.bdqn.pojo.SysUser;
import com.bdqn.util.PageSupport;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserService {
    /**
     * 根据用户ID删除用户
     *
     * @param uploadPath
     * @param userId
     * @return -1表示不存在，1表示成功，0表示失败
     */
    int del(String uploadPath, Long userId);
    int getPwd(String oldPassword,String account);
    int getAccountC(String account);
    boolean add(SysUser sysUser);
    Long count(@Param("realName") String  realName,@Param("roleId")Long roleId);
    List<SysUser> page(@Param("realName") String  realName,@Param("roleId")Long roleId,@Param("page") PageSupport page);
    SysUser login(@Param("account") String account, @Param("password")String password);

    boolean userExist(String account);
    int savePassword(String account,String pwd);

    /**
     * 根据ID查询单个用户
     *
     * @param userId
     * @return
     */
    SysUser getById(Long userId);
}
